package service

import (
	"duoke/internal/dao"
	"duoke/tables"
	"github.com/gin-gonic/gin"
)

var ShareUser = new(shareUserService)

type shareUserService struct{}

func (s *shareUserService) Info(c *gin.Context, where string, field string) (*tables.ShareUser, error) {
	var su tables.ShareUser
	err := dao.ShareUser.Ctx(c).Where(where).Fields(field).Scan(&su)
	if err != nil {
		return nil, err
	}
	return &su, nil
}
